Parity protection techniques are often employed in data processing systems to ensure data integrity and protect against data loss. The data to be protected are typically divided into chunks or blocks of data that are further organized into data groups, each of which consists of a fixed number of data blocks. For a data processing system having a plurality of data storage devices, e.g., a redundant array of independent disks (RAID), each block of data is stored on a different disk with data blocks from several different data groups being stored on a single disk.
In the context of a RAID implementation, parity protection denotes a type of checksum that allows regeneration of unreadable data in a block by evaluating a function of the data values stored in positionally corresponding data blocks that are not in error. A memory controller of the data processing system generally performs such an evaluation, typically in connection with a Booleon exclusive OR (XOR) function. The XOR function is applied bit-by-bit to positionally corresponding bits in each data block of a group and the result is stored in a positionally corresponding bit of a parity block. The parity block for each data grop is then stored on one of the disks containing the data group that the parity block protects.
FIG. 1 is a block diagram of a data processing system 100 that may be used in a conventional RAID implementation. The system 100 comprises a main memory 120 coupled to a memory controller 110 via a memory bus 115. The main memory includes storage locations 122 for holding data blocks B1-B4 of a data group transferred from a plurality of disks (not shown) and the controller contains an XOR function 112 for performing parity operations on the data blocks. The results of the parity operations are then stored in a location 124 in memory 120.
The memory controller typically calculates parity for the data blocks by way of a series of read and write operations over the memory bus 115. For example, B1 is acquired from memory via a read access (R1) over the bus 115, B2 is acquired via a read access (R2) over the bus, parity is calculated from these blocks and the partial result is stored in buffer 124 via a write access (Wp) over the bus. Likewise, data block B3 is acquired via a read bus access (R3), the parital parity result is retrieved via a read bus access (Rp), parity is calculated from these blocks and the partial result is stored via a write bus access (Wp). Finally, B4 is acquired via a read bus access (R4), the parital parity result is retrieved via a read bus access (Rp), parity is calculated from these blocks and the total parity result is stored via a write access (Wt) over the bus. Table 1 summarizes these bus operations required to calculate parity for the data blocks B1-B4. EQU B1.sym.B2=R1, R2, Wp EQU B3.sym.P=R3, Rp, Wp EQU B4.sym.P=R4, Rp, Wt